Skip to main content

mouseH

Type​

function

Summary​

Returns the horizontal position of the mouse pointer.

Syntax​

the mouseH
mouseH()

Description​

Use the mouseH function to find out where the mouse pointer is.

The returned value is the horizontal distance in pixels from the left edge of the current stack to the location of the mouse pointer. (Use the defaultStack property to identify the current stack.)

If the mouseH is positive, the pointer is to the right of the leftmost edge of the stack window. If the number is negative, the pointer is to the left of the stack window.

This function is equal to item 1 of the mouseLoc function.

note

When in a mouseDown handler, you can use the clickH function to get the position of the mouse as it was when the mouseDown actiion occurred.

tip

The mouseMove message sends the mouse's horizontal position as a parameter. This means that in a mouseMove handler, normally it's not necessary to use the mouseH function.

Examples​

the mouseH
add the mouseH to totalWidth

Value​

NameTypeDescription

return

The mouseH function returns an integer.

function: mouseV, clickH

glossary: property, return, stack window, handler, negative, parameter, mouse pointer

keyword: integer, pointer

message: mouseMove

object: stack

control structure: function

Compatibility and Support​

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?